<?php

namespace Shared\Extensions\Twig;

/**
 * Description of Path
 *
 * @author nofear
 */
class Path extends \Twig_Extension {

    public function getFunctions() {
        return array(
            'path' => new \Twig_Function_Method($this, 'createPath'),
        );
    }

    public function createPath($name, array $arg = array()) {
        return \Shared\URLManager::getInstance()->createPath($name, $arg);
    }

    public function getName() {
        return 'path';
    }

}
